export const configSaved = {
  //param中所有的参数可选择性的下发，设备只对下发存在的字段进行配置。
  RptSpinInfoEn: 1, //上报锭子信息使能，默认禁止

  WorkMode: 'Normal', //工作模式 "Normal"-正常  "SenTest"-测试测试  "StopTest"-停喂测试
  SpinOrder: 'ABAB', //锭子排序方式 "ABAB","ABBA","BAAB","BABA","ABCD","ABDC","BACD","BADC","CDAB","CDBA","DCAB","DCBA"
  RefSpeed: 12000, //参考速度rpm

  StopEn: 1, //停喂使能
  StopDelay: 600, //停喂启动延时时间s
  ThreDelay: 60, //状态判断启动延时时间s
  IdleDelay: 900, //空闲判断延时时间s
  NormaDelay: 5, //正常判断延时时间s
  TwistDelay: 90, //弱捻判断延时时间s
  BreakDelay: 5, //断头判断延时时间s
  TwistTher: 70, //弱捻判断阈值%
  BreakTher: 30, //断头判断阈值%

  MAShaftTeh: 10, //主轴齿数
  LFShaftTeh: 10, //左侧前罗拉齿数
  LMShaftTeh: 10, //左侧中罗拉齿数
  LBShaftTeh: 10, //左侧后罗拉齿数
  RFShaftTeh: 10, //右侧前罗拉齿数
  RMShaftTeh: 10, //右侧中罗拉齿数
  RBShaftTeh: 10, //右侧后罗拉齿数
  MAShaftDir: 50, //主轴直径 mm
  LFShaftDir: 50, //左侧前罗拉直径 单位：mm
  LMShaftDir: 50, //左侧中罗拉直径 单位：mm
  LBShaftDir: 50, //左侧后罗拉直径 单位：mm
  RFShaftDir: 50, //右侧前罗拉直径 单位：mm
  RMShaftDir: 50, //右侧中罗拉直径 单位：mm
  RBShaftDir: 50, //右侧后罗拉直径 单位：mm

  CmpVal: 50, //比较值，0~100%
  VolHigh: 2800, //锭子调节电压范围高值mV
  VolLow: 2000, //锭子调节电压范围低值mV

  StopActTime: 200, //停喂动作时间ms
  StopRelTime: 100, //停喂释放时间ms
  StopActions: 1, //停喂动作次数
}

export const fieldProp = [
  { prop: 'RptSpinInfoEn', default: 1, label: '上报锭子信息使能', unit: '' },
  { prop: 'WorkMode', default: 'Normal', label: '工作模式', unit: '', opts: ['Normal', 'SenTest', 'StopTest'] },
  {
    prop: 'SpinOrder',
    default: 'ABAB',
    label: '锭子排序方式',
    unit: '',
    opts: ['ABAB', 'ABBA', 'BAAB', 'BABA', 'ABCD', 'ABDC', 'BACD', 'BADC', 'CDAB', 'CDBA', 'DCAB', 'DCBA'],
  },
  { prop: 'RefSpeed', default: 12000, label: '参考速度', unit: 'rpm' },
  { prop: 'StopEn', default: 1, label: '停喂使能', unit: '' },
  { prop: 'StopDelay', default: 600, label: '停喂启动延时时间', unit: 's' },
  { prop: 'ThreDelay', default: 60, label: '状态判断启动延时时间', unit: 's' },
  { prop: 'IdleDelay', default: 900, label: '空闲判断延时时间', unit: 's' },
  { prop: 'NormaDelay', default: 5, label: '正常判断延时时间', unit: 's' },
  { prop: 'TwistDelay', default: 90, label: '弱捻判断延时时间', unit: 's' },
  { prop: 'BreakDelay', default: 5, label: '断头判断延时时间', unit: 's' },
  { prop: 'TwistTher', default: 70, label: '弱捻判断阈值', unit: '%' },
  { prop: 'BreakTher', default: 30, label: '断头判断阈值', unit: '%' },
  { prop: 'MAShaftTeh', default: 10, label: '主轴齿数', unit: '' },
  { prop: 'LFShaftTeh', default: 10, label: '左侧前罗拉齿数', unit: '' },
  { prop: 'LMShaftTeh', default: 10, label: '左侧中罗拉齿数', unit: '' },
  { prop: 'LBShaftTeh', default: 10, label: '左侧后罗拉齿数', unit: '' },
  { prop: 'RFShaftTeh', default: 10, label: '右侧前罗拉齿数', unit: '' },
  { prop: 'RMShaftTeh', default: 10, label: '右侧中罗拉齿数', unit: '' },
  { prop: 'RBShaftTeh', default: 10, label: '右侧后罗拉齿数', unit: '' },
  { prop: 'MAShaftDir', default: 50, label: '主轴直径', unit: 'mm' },
  { prop: 'LFShaftDir', default: 50, label: '左侧前罗拉直径', unit: 'mm' },
  { prop: 'LMShaftDir', default: 50, label: '左侧中罗拉直径', unit: 'mm' },
  { prop: 'LBShaftDir', default: 50, label: '左侧后罗拉直径', unit: 'mm' },
  { prop: 'RFShaftDir', default: 50, label: '右侧前罗拉直径', unit: 'mm' },
  { prop: 'RMShaftDir', default: 50, label: '右侧中罗拉直径', unit: 'mm' },
  { prop: 'RBShaftDir', default: 50, label: '右侧后罗拉直径', unit: 'mm' },
  { prop: 'CmpVal', default: 50, label: '比较值', uni: '' },
  { prop: 'VolHigh', default: 2800, label: '锭子调节电压范围高值', unit: 'mV' },
  { prop: 'VolLow', default: 2000, label: '锭子调节电压范围低值', unit: 'mV' },
  { prop: 'StopActTime', default: 200, label: '停喂动作时间', unit: 'ms' },
  { prop: 'StopRelTime', default: 100, label: '停喂释放时间', unit: 'ms' },
  { prop: 'StopActions', default: 1, label: '停喂动作次数', unit: '' },
]

let t = {
  id: '0000000000000000',
  PackType: 'GetBaseCfg',
  TimeSec: 0,
  Result: 'succeed',
  Param: {
    RptSpinInfoEn: 1,
    WorkMode: 'Normal',
    SpinOrder: 'ABAB',
    RefSpeed: 12000,
    StopEn: 1,
    StopDelay: 600,
    ThreDelay: 60,
    IdleDelay: 900,
    NormDelay: 5,
    TwistDelay: 90,
    BreakDelay: 5,
    TwistTher: 70,
    BreakTher: 30,
    MAShaftTeh: 10,
    LFShaftTeh: 10,
    LMShaftTeh: 10,
    LBShaftTeh: 10,
    RFShaftTeh: 10,
    RMShaftTeh: 10,
    RBShaftTeh: 10,
    MAShaftDir: 50,
    LFShaftDir: 50,
    LMShaftDir: 50,
    LBShaftDir: 50,
    RFShaftDir: 50,
    RMShaftDir: 50,
    RBShaftDir: 50,
    CmpVal: 50,
    VolHigh: 2800,
    VolLow: 2000,
    StopActTime: 200,
    StopRelTime: 100,
    StopActions: 1,
  },
}
